home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-20 / nosvw304.zip / NOSGAS.ZIP / PUBLIC / NOSVIEW / ROUTE < prev    next >
Text File  |  1992-12-31  |  7KB  |  164 lines

  1. =====                                               NOSview [301]
  2. route
  3. =====
  4.  
  5. _________________________________________________________________
  6. route
  7. _________________________________________________________________
  8. Display the IP routing table.
  9.  
  10. >> Example of a 'route' display output:
  11.  
  12. ..............................................................
  13. : Dest         Len Interface  Gateway   Metric  P Timer  Use :
  14. : uk           32  tnc0                 1       P man    1   :
  15. : ns9liz       32  tnc0       ns9gwb    1         man    3   :
  16. : region42     24  tnc0       ns9gwa    1         man    0   :
  17. : 192.1.2.0    24  sl0                  1       P man    0   :
  18. : region41     24  tnc0       ns9bob    1       P man    0   :
  19. : default      0   tnc0                 1       P man    4   :
  20. :............................................................:
  21.  
  22. The 'P' entries are private entries which are not distributed to
  23. other hosts.
  24.  
  25.  
  26. _________________________________________________________________
  27. route add <target_host>[/bits] | default  <interface>
  28.                                     [<gateway_host>[<metric>]]
  29. _________________________________________________________________
  30. The 'route add' command adds an entry to the routing table.  It
  31. requires at least two more arguments: the target host and the
  32. name of the interface to which its packets should be sent.
  33.  
  34. If the target is not local, the gateway should also be specified.
  35. (If the interface is a point-to-point link, then <gateway_host>
  36. may be omitted even if the target is non-local, because this
  37. field is only used to determine the gateway's link level address,
  38. if any).
  39.  
  40. If the destination is directly reachable, <gateway_host> is also
  41. unnecessary since the destination address is used to determine
  42. the interface link address.
  43.  
  44. The optional '/bits' suffix to <target_host> specifies how many
  45. leading bits in the host IP address are to be considered
  46. significant in the routing comparisons.  If not specified, 32
  47. bits (i.e. full significance) is assumed.
  48.  
  49. With this option, a single routing table entry may refer to many
  50. hosts all sharing a common bit string prefix in their IP
  51. addresses.  For example, ARPA Class A, B and C networks would use
  52. suffixes of /8, /16 and /24 respectively.  Hence the command
  53. 'route add 44/8 sl0 44.64.0.2' causes any IP addresses beginning
  54. with '44' in the first 8 bits to be routed to 44.64.0.2; the
  55. remaining 24 bits are "don't-cares".
  56.  
  57. To make displayed reports more meaningful, subnets can be given
  58. names in /domain.txt, and then used in the 'route' command.  For
  59. example, if "region42" is defined as "44.191.42.0" in the hosts
  60. file, you can then give a command of the form 'route add
  61. region42/24 ...'
  62.  
  63. When an IP address to be routed matches more than one entry in
  64. the routing table, the entry with largest bits parameter (i.e.
  65. the "best" match) is used.  This allows individual hosts or
  66. blocks of hosts to be exceptions to a more general rule for a
  67. larger block of hosts.
  68.  
  69. The special target 'default' is used to route datagrams to
  70. addresses not matched by any other entries in the routing table;
  71. it is equivalent to specifying a '/bits' suffix of '/0'.  Care
  72. must be taken with 'default' entries since two nodes with default
  73. entries pointing at each other will route packets to unknown
  74. addresses back and forth in a loop until their time-to-live (TTL)
  75. fields expire.  (Routing loops for specific addresses can also be
  76. created, but this is less likely to occur accidentally).
  77.  
  78. >> Examples:  route add default en0 192.5.6.7
  79.               route add 44.191.42.0/24 tnc0 ns9gwa
  80.               route add region42/24 tnc0 ns9gwa
  81.               route add default tnc0
  82.               route add ns9jim tnc0
  83.               route add 192.3.4.5 sl0  (no gateway, as SLIP is
  84.                                         point-to-point)
  85.  
  86. _________________________________________________________________
  87. route addprivate <target_host>[/bits] | default <interface>
  88.                         [<gateway_host> [<metric>]]
  89. _________________________________________________________________
  90. The 'route addprivate' command is identical to 'route add' except
  91. that it also marks the new entry as private; it will never be
  92. included in outgoing RIP updates.
  93.  
  94. >> Example:  route addprivate region41/24 ns9bob
  95.  
  96.  
  97. _________________________________________________________________
  98. route drop <target_host>[/bits]
  99. _________________________________________________________________
  100. The 'route drop' command deletes an entry from the table.  If a
  101. packet arrives for the deleted address and a default route is in
  102. effect, it will be used.
  103.  
  104. >> Examples:  route drop ns9liz
  105.               route drop region42/24
  106.  
  107.  
  108. _________________________________________________________________
  109. route flush
  110. _________________________________________________________________
  111. Remove all automatically-entered entries from the IP routing
  112. table.
  113.  
  114.  
  115. _________________________________________________________________
  116. route lookup <target_host>
  117. _________________________________________________________________
  118. Display the routing table entry for <target_host>.
  119.  
  120. >> Examples:  route lookup region42
  121.               route lookup ns9liz
  122.  
  123.  
  124.  
  125. There are two built-in interfaces: loopback and encap.
  126.  
  127. Loopback is for internal purposes only.
  128.  
  129. The encap is an IP encapsulator interface.  This is used to
  130. encapsulate a complete IP datagram into an IP datagram so that it
  131. gets "piggy-backed".  It is often used to carry AMPRnet datagrams
  132. over the Internet.  This way two sites can interchange AMPRnet
  133. datagrams with each other.
  134.  
  135. Some extra notes: An Internet gateway has 2 IP addresses: one on
  136. AMPRnet and one on the Internet.  You should make sure that the
  137. interface connected to the Internet has the 'ifconfig ipaddr' set
  138. correctly.  Note: This previously only worked as gateway for
  139. other stations.  There was some guessing done in picking an IP
  140. address when encap is used localy.  The guessing takes the worst
  141. guess.  The code now uses the local IP address as source when the
  142. route starts at the local station.  If this is not what you want,
  143. you can overrule this by setting the IP address of the pseudo-
  144. encap interface to what you want it to be.
  145.  
  146. [Additional notes from PA0GRI: I have 3 systems on an Ethernet
  147. with network 129.179.122.128/25.  In the office I have another
  148. net linked to the Internet.  The addresses there are in the
  149. 129.179.122.0/25 range.  Now I have a radio link with 44.137.0.2
  150. and 44.137.1.2 on respective sites.  On the 44.137.0.2 system I
  151. have 'route add 44.0.0.0/8 encap 44.137.1.1 99'.  On a next
  152. system on my local Ethernet I have 44.137.0.1 / 129.179.122.129.
  153.  
  154. To get from that system to say 44.62.0.1 I have to add an encap
  155. to my local gateway with:
  156.           'route add 44.0.0.0/8 encap 129.179.122.130'.
  157.  
  158. A 'route add default ec0 129.179.122.130' gives me access to the
  159. Internet.  Otherwise it will lookup the address for the interface
  160. to be used to reach 129.179.122.130 and will use 129.179.122.129.
  161. Now 44.62.0.1 will NEVER know where it came from.  So
  162. adding the encap on the second system solves the problem].
  163.  
  164.